//
//  AppSetting.h
//  WeightMaster
//
//  Created by sungeo on 15/8/14.
//  Copyright (c) 2015年 buddysoft. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BaseModel.h"
#import "BDiCloudManager.h"

extern NSString * const WMSettingsChanged;
extern NSString * const WMGotSettingFromiCloud;
extern NSString * const WMCoverChanged;

typedef enum{
    WMGenderMale = 0,       // 男神
    WMGenderFemale = 1,     // 女神
}WMGender;

@interface WMAppSetting : BaseModel<BDiCloudDelegate>

/**
 *  性别
 */
@property (nonatomic, strong) NSNumber * gender;

/**
 *  身高（默认单位：厘米）
 */
@property (nonatomic, strong) NSNumber * height;

/**
 *  目标体重（单位：公斤）
 */
@property (nonatomic, strong) NSNumber * goalWeight;

/**
 *  体重显示单位，WMWeightUnit 
 */
@property (nonatomic, strong) NSNumber * weightUnit;

/**
 *  是否保存到 iCloud
 */
@property (nonatomic, strong) NSNumber * savedToiCloud;


+ (instancetype)sharedInstance;

/**
 *  从云端查询配置信息
 */
- (void)queryDataFromiCloud;

/**
 *  保存设置信息到缓存
 */

- (void)syncData;

/**
 *  是否设置过目标体重
 *
 *  @return YES，设置过；NO，未设置
 */
- (BOOL)isSetGoalWeight;

/**
 * 封面图存取接口（只保存在本地，不存储到 iCloud）
 */
- (UIImage *)coverImage;
- (void)setCoverImage:(UIImage *)image;



@end
